home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / ANIMICON.H < prev    next >
C/C++ Source or Header  |  1993-02-27  |  2KB  |  56 lines

  1. #ifndef ANIMICON.H
  2.  
  3. #define ANIMICON.H
  4.  
  5. #include <stddef.h>
  6. #include "stddefs.h"
  7. #include "icon.h"
  8.  
  9. class animiconNode
  10. {
  11. public:
  12.   animiconNode * nextFrame;
  13.   animiconNode * prevFrame;
  14.   icon picture;
  15.   animiconNode() {nextFrame = NULL; prevFrame = NULL;}
  16.   animiconNode(byte * iconData, animiconNode * nextIcon)
  17.     {picture.useData(iconData); nextFrame = nextIcon; prevFrame = NULL;};
  18. };
  19.  
  20. class animicon
  21. {
  22. public:
  23.   animiconNode * firstFrame;
  24.   animiconNode * lastFrame;
  25.   animiconNode * thisFrame;
  26.   byte numberOfFrames;
  27.   animicon() {firstFrame = lastFrame = thisFrame = NULL; numberOfFrames = 0;}
  28.   animicon(char * filename, icon::flagType flags = icon::normal, yakLib * myYakLib = NULL);
  29.   ~animicon();
  30.   char far * add(animiconNode * thisNode);
  31.   char far * add(char far *filename, icon::flagType flags = icon::normal, yakLib * myYakLib = NULL);
  32.   inline void show(int x, int y, word pagebase);//virt
  33.   inline void draw(int x, int y, word pagebase);//virt
  34.   inline void showZoomed(int x, int y, word offset, int newWidth);
  35.   inline void drawZoomed(int x, int y, word offset, int newWidth);
  36.   inline void advance(void); //virt
  37.   void removeTail(void);
  38.   void addAll(char * filename, icon::flagType flags = icon::normal, yakLib * myYakLib = NULL);
  39.   void hide(int x, int y, word toOffset, word fromOffset);
  40. };
  41.  
  42.  
  43. class animslave
  44. {
  45. public:
  46.   animiconNode * thisFrame;
  47.   animslave() {thisFrame = NULL;}
  48.   virtual void advance(void);
  49.   virtual void advance(int numFrames);
  50.   inline void draw(int x, int y, word pagebase);//virt
  51.   inline void show(int x, int y, word pagebase);//virt
  52.   inline void showZoomed(int x, int y, word offset, int newWidth);
  53.   inline void drawZoomed(int x, int y, word offset, int newWidth);
  54. };
  55.  
  56. #endif